package com.dubbo.cp.provider.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.dubbo.cp.IService.ClassroomService;
import com.dubbo.cp.entity.ClassroomEntity;
import com.dubbo.cp.provider.mapper.ClassroomMapper;
@Service
public class ClassroomServiceImpl implements ClassroomService {

	@Autowired
	ClassroomMapper classroomMapper;
	@Override
	public ClassroomEntity findClassroomByClassroomid(int id) {
		
		return classroomMapper.findClassroomByClassroomid(id);
	}

	@Override
	public ClassroomEntity findClassroomByClassroomName(String classroomName) {
		
		return classroomMapper.findClassroomByClassroomName(classroomName);
	}

	@Override
	public void insertClassroomEntity(ClassroomEntity classroomEntity) {
		
          classroomMapper.insertClassroomEntity(classroomEntity);
	}

	@Override
	public void deleteClassroomEntity(int id) {
		classroomMapper.deleteById(id);

	}

	@Override
	public List<ClassroomEntity> getClassroomByPage(int start, int size) {
	
		return classroomMapper.getClassroomByPage(start, size);
	}

	@Override
	public List<ClassroomEntity> getClassroomList() {
	
		return classroomMapper.getClassroomList();
	}

	@Override
	public void updateClassroomEntity(ClassroomEntity classroomEntity) {
		classroomMapper.UpdateClassroomEntity(classroomEntity);

	}

}
